import os
import sys
import os.path

rootdir = "/home/letitia/py-R-FCN/data/VOCdevkit0712/VOC0712/JPEGImages"
#rootdir = "/home/letitia/py-R-FCN/data/VOCdevkit2007/task_10216/JPEGImages"

f = open("/home/letitia/py-R-FCN/data/VOCdevkit0712/VOC0712/a.txt","w")

for path,subdir,dirnames in os.walk(rootdir):
	for dirname in dirnames:
		s = dirname.split('.')
		f.write(s[0])
		f.write('\n')
		#print s[0]


f.close()
